#include <stdio.h>
#include <stdlib.h>
#include "Includes/Rectangle.h"
#include "Includes/Region.h"
#include <unistd.h>

/// <summary>
/// TODO
/// </summary>
int GalRegionCreate(RegionPtr *region)
{
	if (!region)
		return -1;

	if (!(*region = (RegionPtr)malloc(sizeof(Region))))
		return -1;

	RegionPtr r = *region;
	r->count = 0;
	r->rects = NULL;

	return 0;
}

/// <summary>
/// TODO
/// </summary>
int GalRegionGetBounds(RegionPtr region)
{
	if (region == NULL)
		return -1;

	return 0;
}

/// <summary>
/// TODO
/// </summary>
int GalRegionAddRect(RegionPtr region, RectanglePtr rect)
{
	if (region == NULL)
		return -1;

	if (rect == NULL)
		return -1;

	return 0;
}

/// <summary>
/// TODO
/// </summary>
int GalRegionDestroy(RegionPtr region)
{
	if (region == NULL)
		return -1;
	free(region->rects);
	free(region);
	return 0;
}
